#!/bin/bash

set -o errexit
set -o pipefail
export LC_ALL=C

NODES_NUM=$1
SYNC_DIR=$2
GENOMES_NUM=$3
RESULTS_DIR=$4

NODE_ID=`/home/mixagol/work/gene-class/tools/sync_workers.py $NODES_NUM $SYNC_DIR`

/home/mixagol/work/gene-class/3_normed_matrix/pre_calc_intersections \
  -g $GENOMES_NUM \
  -f $NODE_ID \
  -n $NODES_NUM \
  > ${RESULTS_DIR}/${NODE_ID}.txt


